package com.burst.reptile.modular.system.service.impl;

import com.burst.reptile.modular.system.entity.SysNotice;
import com.burst.reptile.modular.system.mapper.SysNoticeMapper;
import com.burst.reptile.modular.system.service.ISysNoticeService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Arrays;

import org.springframework.stereotype.Service;

/**
 * <p>
 * 通知公告表 服务实现类
 * </p>
 *
 * @author wujin
 * @since 2020-06-08
 */
@Service
public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService {

	@Override
	public Page<SysNotice> selectPageNoticeList(Page<SysNotice> page, SysNotice notice) {
		return this.baseMapper.selectPageNoticeList(page, notice);
	}

	@Override
	public SysNotice selectNoticeById(Long noticeId) {
		return this.baseMapper.selectById(noticeId);
	}

	@Override
	public int insertNotice(SysNotice notice) {
		return this.baseMapper.insert(notice);
	}

	@Override
	public int updateNotice(SysNotice notice) {
		return this.baseMapper.updateById(notice);
	}

	@Override
	public int deleteNoticeByIds(Long[] noticeIds) {
		return this.baseMapper.deleteBatchIds(Arrays.asList(noticeIds));
	}

}
